$( document ).ready(function(){
	$( 'a.ajaxdemoone' ).click( function(){
		$.ajax({
			url: this.href,
			success: ajaxdemoOne
		});
		
		return false;
	});
	
	$( 'a.ajaxdemotwo' ).click( function(){
		$.ajax({
			url: this.href,
			success: ajaxdemoTwo
		});
		
		return false;
	});
});

function ajaxdemoOne(json){
	eval( 'result='+json );
	if( result.success == true ){
		$( 'p.ajaxdemoResult' ).html( 'The ajax responded with success at the time stamp: '+result.stamp );
	} else {
		$( 'p.ajaxdemoResult' ).html( 'The ajax request did not succeed.' );
	};
};

function ajaxdemoTwo(json){
	eval( 'result='+json );
	if( result.success == true ){
		$( 'p.ajaxdemoResult2' ).html( result.html );
	};
};